package com.donn.securitycontrolplatform.positioninformation.controller;


import com.donn.securitycontrolplatform.common.Result;
import com.donn.securitycontrolplatform.positioninformation.request.PersonsTrackReq;
import com.donn.securitycontrolplatform.positioninformation.request.SinglePersonTrackfoReq;
import com.donn.securitycontrolplatform.positioninformation.service.ITPositionInfoService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * LOC 标签位置信息 前端控制器
 * </p>
 *
 * @author zhenglx
 * @since 2022-06-23
 */
@RestController
@RequestMapping("/scp/api/position-info")
@Tag(name = "PositionInfoController", description = "人员定位controller")
public class TPositionInfoController {
    @Autowired
    ITPositionInfoService service;

    @ApiOperation(value = "单人轨迹")
    @GetMapping("/single/track/list")
    @ResponseBody
    public Result getSingleTracklist(SinglePersonTrackfoReq req) {
        return service.getSingleTracklist(req);
    }

    @ApiOperation(value = "多人轨迹")
    @GetMapping("/persons/track/list")
    @ResponseBody
    public Result getPersonstTrack(PersonsTrackReq req) {
        return service.getPersonstTrack(req);
    }


    @ApiOperation(value = "查询最近50次轨迹")
    @GetMapping("/last50time/get")
    @ResponseBody
    public Result getLast50timeByKeyword(@ApiParam @RequestParam("keyWord") String keyWord) {
        return service.getLast50timeByKeyword(keyWord);
    }

}
